package shiro.authc.config.freemarker;

import com.jagregory.shiro.freemarker.ShiroTags;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class FreeMarkerConfig
{

	@Autowired
	private freemarker.template.Configuration configuration;

	@PostConstruct
	public void setSharedVariable()
	{
		try
		{
			configuration.setSharedVariable("shiro", new ShiroTags());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

}
